//
//  StatusForwardCell.swift
//  WeiBo001
//
//  Created by Zhanghong on 15/7/3.
//  Copyright © 2015年 HeiMa. All rights reserved.
//

import UIKit
import FFAutoLayout


class StatusForwardCell: StatusCell {
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        forwardLabel = UILabel(color: UIColor.darkGrayColor(), fontsize: 14, mutiLines: true)
        forwardLabel?.preferredMaxLayoutWidth = UIScreen.mainScreen().bounds.width - 16
        insertSubview(forwardLabel!, atIndex: 0)
        
        forwarButton.backgroundColor = UIColor(white: 0.9, alpha: 1.0)
        insertSubview(forwarButton, atIndex: 0)
        
        forwarButton.ff_AlignVertical(ff_AlignType.BottomLeft, referView: contentLable, size: nil, offset: CGPoint(x: -12, y: 0))
        forwarButton.ff_AlignVertical(ff_AlignType.TopRight, referView: footerView, size: nil)
        
        forwardLabel?.ff_AlignInner(ff_AlignType.TopLeft, referView: forwarButton, size: nil, offset: CGPoint(x: 12, y: 12))
        
//        let cons  = pictureView.ff_AlignVertical(ff_AlignType.BottomLeft, referView: forwardLabel!, size: CGSize(width: 290, height: 90), offset: CGPoint(x: 0, y: 12))
//        widthCons = pictureView.ff_Constraint(cons, attribute: NSLayoutAttribute.Width)
//        heightCons = pictureView.ff_Constraint(cons, attribute: NSLayoutAttribute.Height)
        recordPictureViewCons(pictureView.ff_AlignVertical(ff_AlignType.BottomLeft, referView: forwardLabel!, size: CGSize(width: 290, height: 90), offset: CGPoint(x: 0, y: 12)))
        
    }

    required init(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    lazy var forwarButton = UIButton()
}
